﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace DBO_ShopMob
{
    [DataContract]
    public class Categorie
    {
        public Categorie()
        {
            //articles = new List<Article>();
            //sousCategories = new List<Categorie>();
        }
        #region "propriete"
        /// <summary>
        /// Réference de la catégorie
        /// </summary>
        private long _id;
        [DataMember]
        public long id
        {
            get { return _id; }
            set { _id = value; }
        }

        /// <summary>
        /// Nom de la categorie
        /// </summary>
        private string _nom;
        [DataMember]
        public string nom
        {
            get { return _nom; }
            set { _nom = value; }
        }

        /// <summary>
        /// Descriptif de la categorie
        /// </summary>
        private string _details;
        [DataMember]
        public string details
        {
            get { return _details; }
            set { _details = value; }
        }

        /// <summary>
        /// Réference de la categorie parente
        /// </summary>
        private long _idMere;
        [DataMember]
        public long idMere
        {
            get { return _idMere; }
            set { _idMere = value; }
        }
        /*
        /// <summary>
        /// 
        /// </summary>
        private List<Article> articles;
        [DataMember]
        public List<Article> Articles
        {
            get { return articles; }
            set { articles = value; }
        }

        private List<Categorie> sousCategories;
        [DataMember]
        public List<Categorie> SousCategories
        {
            get { return sousCategories; }
            set { sousCategories = value; }
        }

         * 
        public void ajouterSousCategorie(Categorie sousCategorie) {
            sousCategories.Add(sousCategorie);
        }

        public void ajouterArticle(Article article) {
            articles.Add(article);
        }
        */
        #endregion

    }
}
